const express = require('express');
const path = require('path');
const app = express();
 
// 设置静态文件目录
app.use(express.static(path.join(__dirname, 'public')));
 
// 设置首页路由
app.get('/', function(req, res) {
    res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
 
// 监听3000端口
app.listen(3000, function() {
    console.log('Server is running on http://localhost:3000');
});
